<!DOCTYPE html>

<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">

<title>module TJP - TJPlurker API Documentation</title>

<link type="text/css" media="screen" href="./rdoc.css" rel="stylesheet">

<script type="text/javascript">
  var rdoc_rel_prefix = "./";
</script>

<script type="text/javascript" charset="utf-8" src="./js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="./js/navigation.js"></script>
<script type="text/javascript" charset="utf-8" src="./js/search_index.js"></script>
<script type="text/javascript" charset="utf-8" src="./js/search.js"></script>
<script type="text/javascript" charset="utf-8" src="./js/searcher.js"></script>
<script type="text/javascript" charset="utf-8" src="./js/darkfish.js"></script>


<body id="top" class="module">
<nav id="metadata">
  <nav id="home-section" class="section">
  <h3 class="section-header">
    <a href="./index.html">Home</a>
    <a href="./table_of_contents.html#classes">Classes</a>
    <a href="./table_of_contents.html#methods">Methods</a>
  </h3>
</nav>


  <nav id="search-section" class="section project-section" class="initially-hidden">
  <form action="#" method="get" accept-charset="utf-8">
    <h3 class="section-header">
      <input type="text" name="search" placeholder="Search" id="search-field"
             title="Type to search, Up and Down to navigate, Enter to load">
    </h3>
  </form>

  <ul id="search-results" class="initially-hidden"></ul>
</nav>


  <div id="file-metadata">
    <nav id="file-list-section" class="section">
  <h3 class="section-header">Defined In</h3>
  <ul>
    <li>lib/tjplurker/core.rb
    <li>lib/tjplurker/robot.rb
  </ul>
</nav>

    
  </div>

  <div id="class-metadata">
    
    
    
    <!-- Method Quickref -->
<nav id="method-list-section" class="section">
  <h3 class="section-header">Methods</h3>

  <ul class="link-list">
    
    <li><a href="#method-i-get_uid">#get_uid</a>
    
  </ul>
</nav>

  </div>

  <div id="project-metadata">
    <nav id="fileindex-section" class="section project-section">
  <h3 class="section-header">Pages</h3>

  <ul>
  
    <li class="file"><a href="./GETSTART.html">GETSTART</a>
  
    <li class="file"><a href="./MAKEROBOT.html">MAKEROBOT</a>
  
    <li class="file"><a href="./README.html">README</a>
  
  </ul>
</nav>

    <nav id="classindex-section" class="section project-section">
  <h3 class="section-header">Class and Module Index</h3>

  <ul class="link-list">
  
    <li><a href="./Legacy.html">Legacy</a>
  
    <li><a href="./Legacy/TJPlurker.html">Legacy::TJPlurker</a>
  
    <li><a href="./Legacy/TJPlurker/NotificationData.html">Legacy::TJPlurker::NotificationData</a>
  
    <li><a href="./Legacy/TJPlurker/Robot.html">Legacy::TJPlurker::Robot</a>
  
    <li><a href="./Legacy/TJPlurker/Service.html">Legacy::TJPlurker::Service</a>
  
    <li><a href="./Legacy/TJPlurker/ThreadService.html">Legacy::TJPlurker::ThreadService</a>
  
    <li><a href="./TJP.html">TJP</a>
  
    <li><a href="./TJP/NotificationData.html">TJP::NotificationData</a>
  
    <li><a href="./TJP/Robot.html">TJP::Robot</a>
  
    <li><a href="./TJP/Service.html">TJP::Service</a>
  
    <li><a href="./TJP/TJPlurker.html">TJP::TJPlurker</a>
  
    <li><a href="./TJP/ThreadService.html">TJP::ThreadService</a>
  
  </ul>
</nav>

  </div>
</nav>

<div id="documentation">
  <h1 class="module">module TJP</h1>

  <div id="description" class="description">
    
  </div><!-- description -->

  
  
  
  <section id="5Buntitled-5D" class="documentation-section">
    

    

    

    

    <!-- Methods -->
    
     <section id="public-instance-5Buntitled-5D-method-details" class="method-section section">
      <h3 class="section-header">Public Instance Methods</h3>

    
      <div id="method-i-get_uid" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">get_uid</span><span
            class="method-args">(user_name)</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>
        

        <div class="method-description">
          
          <p>Convert user name into user_id, e.g. Given “tonytonyjan”, return 5874158 in
Integer</p>
<dl class="rdoc-list note-list"><dt>return
<dd>
<p>user id in Integer</p>
</dd></dl>
          

          
          <div class="method-source-code" id="get_uid-source">
            <pre><span class="ruby-comment"># File lib/tjplurker/core.rb, line 713</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_uid</span> <span class="ruby-identifier">user_name</span>
    <span class="ruby-identifier">open</span>(<span class="ruby-node">&quot;http://www.plurk.com/#{user_name}&quot;</span>).<span class="ruby-identifier">read</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp">%r&quot;user_id&quot;: (\d*)/</span>
    <span class="ruby-identifier">raise</span> <span class="ruby-node">&quot;User \&quot;#{user_name}\&quot; not found.&quot;</span> <span class="ruby-keyword">unless</span> <span class="ruby-node">$1</span>
    <span class="ruby-keyword">return</span> <span class="ruby-node">$1</span>.<span class="ruby-identifier">to_i</span>
<span class="ruby-keyword">end</span></pre>
          </div><!-- get_uid-source -->
          
        </div>

        

        
      </div><!-- get_uid-method -->

    
    </section><!-- public-instance-method-details -->
  
  </section><!-- 5Buntitled-5D -->

</div><!-- documentation -->


<footer id="validator-badges">
  <p><a href="http://validator.w3.org/check/referer">[Validate]</a>
  <p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.12.
  <p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
</footer>

